* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dimension-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    margin-bottom: 10px;
}

.dimension-btn {
    padding: 10px 20px;
    background: rgba(52, 152, 219, 0.3);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dimension-btn.active {
    background: rgba(52, 152, 219, 0.8);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.day-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.day-btn {
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.3);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.day-btn.active {
    background: rgba(52, 152, 219, 0.8);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.day-btn:hover {
    background: rgba(52, 152, 219, 0.6);
}

.day-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

header {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

.main-content {
    display: flex;
    gap: 15px;
}

.map-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#map-container {
    width: 100%;
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
}

.aftershock-sidebar {
    width: 320px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    max-height: 750px;
}

.sidebar-header {
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.aftershock-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.aftershock-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.aftershock-time {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 5px;
}

.aftershock-magnitude {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.magnitude-value {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 8px;
}

.magnitude-low {
    background-color: #ffc107;
    color: #000;
}

.magnitude-medium {
    background-color: #fd7e14;
    color: #fff;
}

.magnitude-high {
    background-color: #dc3545;
    color: #fff;
}

.aftershock-location {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.aftershock-coordinates {
    font-size: 0.85rem;
    color: #aaa;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.time-controls {
    flex: 1;
    min-width: 300px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    gap: 15px;
}

#time-slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #444;
    outline: none;
    margin: 10px 0;
}

#time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
}

.time-stages {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #bbb;
    margin-top: 5px;
}

.time-stages span {
    flex: 1;
    text-align: center;
    padding: 0 5px;
}

.play-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#play-pause-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#play-pause-btn:hover {
    background: #2ecc71;
}

#speed-select {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0 10px;
    cursor: pointer;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cluster-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.hidden {
    display: none;
}

/* 信息窗口样式优化 */
.info-window-content {
    min-width: 280px;
    padding: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-window-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.info-window-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.info-window-label {
    font-weight: bold;
    min-width: 90px;
    color: #555;
    flex-shrink: 0;
}

.info-window-value {
    flex: 1;
    color: #333;
    word-break: break-word;
}

.jump-button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.jump-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 标记点击优化 */
.BMapMarker {
    cursor: pointer !important;
    z-index: 1000 !important;
}

/* 响应式设计优化 */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .aftershock-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .time-display {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 900px) {
    .controls {
        flex-direction: column;
    }
    
    .time-controls {
        min-width: 100%;
    }
    
    .legend {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .time-stages {
        flex-direction: column;
        gap: 5px;
    }
    
    .time-stages span {
        text-align: left;
    }
    
    .day-selector {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 15px;
    }
    
    .info-window-content {
        min-width: 240px;
        padding: 12px;
    }
    
    .info-window-item {
        flex-direction: column;
        gap: 3px;
    }
    
    .info-window-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    .map-container, .aftershock-sidebar {
        padding: 10px;
    }
    
    #map-container {
        height: 400px;
    }
    
    .play-controls {
        flex-direction: column;
    }
    
    #play-pause-btn, #speed-select {
        width: 100%;
        text-align: center;
    }
}

/* 添加道路图例 */
#road-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

.road-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.road-line {
    width: 30px;
    height: 5px;
    display: inline-block;
}

.road-line.green {
    background-color: green;
}

.road-line.yellow {
    background-color: yellow;
}

.road-line.red {
    background-color: red;
}